

<?php

$q=$_GET["q"];
// 创建连接
$conn = new mysqli("localhost", "root","wei1995629", "information");
// 检测连接
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}

$sql = "UPDATE userInformation SET admin = 'ADMIN' WHERE userName = '" .$q ."'";
$result = mysqli_query($conn,$sql);


 $conn->close();//关闭数据库
?>